const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const path = require("path");

module.exports = merge(common, {
    mode: "development",
    output: {
        path: path.resolve(__dirname, "dist"),
        filename: "[name]-[hash:5].bundle.js",
        chunkFilename: "[name]-[hash:5].chunk.js",
    },
    devtool: "inline-source-map",
    devServer: {
        publicPath: "/",
        contentBase: path.resolve(__dirname, "dist"),
        compress: true,
        port: 3000,
        historyApiFallback: true,
        hot: true
    },
});